// 引入 request 文件
import request from './http.js'

// 订单列表
export const orderIndex = (params) => {
    return request({
        url: '/api/applet/order/index',
        method: 'get',
        data: params
    })
}

// 订单详情
export const detail = (params) => {
    return request({
        url: '/api/applet/order/detail',
        method: 'get',
        data: params
    })
}

// 订单产品
export const product = (params) => {
    return request({
        url: '/api/applet/order/product',
        method: 'get',
        data: params
    })
}

// 订单产品型号
export const getProductModel = (params) => {
    return request({
        url: '/api/applet/order/getProductModel',
        method: 'get',
        data: params
    })
}

// 订单产品新增
export const orderProductAddSub = (params) => {
    return request({
        url: '/api/applet/order/orderProductAddSub',
        method: 'post',
        data: params
    })
}

// 订单产品详情
export const productDetail = (params) => {
    return request({
        url: '/api/applet/order/productDetail',
        method: 'get',
        data: params
    })
}

// 订单产品编辑
export const orderProductEditSub = (params) => {
    return request({
        url: '/api/applet/order/orderProductEditSub',
        method: 'post',
        data: params
    })
}

// 订单清单
export const productInventory = (params) => {
    return request({
        url: '/api/applet/order/productInventory',
        method: 'get',
        data: params
    })
}

// 订单生产信息
export const productInfos = (params) => {
    return request({
        url: '/api/applet/order/productInfos',
        method: 'get',
        data: params
    })
}


// 订单清单单条信息
export const productInventoryDetail = (params) => {
    return request({
        url: '/api/applet/order/productInventoryDetail',
        method: 'get',
        data: params
    })
}

// 订单生产信息
export const productInfoDetail = (params) => {
    return request({
        url: '/api/applet/order/productInfoDetail',
        method: 'get',
        data: params
    })
}

// 获取设计人员
export const designer = (params) => {
    return request({
        url: '/api/applet/order/designer',
        method: 'get',
        data: params
    })
}


// 新增
export const orderAddSub = (params) => {
    return request({
        url: '/api/applet/order/orderAddSub',
        method: 'post',
        data: params
    })
}

// 编辑
export const orderEditSub = (params) => {
    return request({
        url: '/api/applet/order/orderEditSub',
        method: 'post',
        data: params
    })
}

// 上传正式合同
export const editOrderContract = (params) => {
    return request({
        url: '/api/applet/order/editOrderContract',
        method: 'post',
        data: params
    })
}

// 技术经理确认
export const goConfirmSubComplete = (params) => {
    return request({
        url: '/api/applet/order/goConfirmSubComplete',
        method: 'post',
        data: params
    })
}

// 设计复审
export const suppliesListCheckSubComplete = (params) => {
    return request({
        url: '/api/applet/order/suppliesListCheckSubComplete',
        method: 'get',
        data: params
    })
}

// 订单物流信息上传
export const shipmentSub = (params) => {
    return request({
        url: '/api/applet/order/shipmentSub',
        method: 'post',
        data: params
    })
}

// 订单采购信息上传
export const procurementSub = (params) => {
    return request({
        url: '/api/applet/order/procurementSub',
        method: 'post',
        data: params
    })
}
// 订单物料入库信息上传
export const materialWareHousingSub = (params) => {
    return request({
        url: '/api/applet/order/materialWareHousingSub',
        method: 'post',
        data: params
    })
}

// 采购资料全部完成
export const procurementCompleteSub = (params) => {
    return request({
        url: '/api/applet/order/procurementCompleteSub',
        method: 'get',
        data: params
    })
}
// 物料入库全部完成
export const materialWareHousingCompleteSub = (params) => {
    return request({
        url: '/api/applet/order/materialWareHousingCompleteSub',
        method: 'get',
        data: params
    })
}

// 预计完成时间
export const progressTimeCompleteSub = (params) => {
    return request({
        url: '/api/applet/order/progressTimeCompleteSub',
        method: 'post',
        data: params
    })
}

// 生产资料上传
export const productionProcessSub = (params) => {
    return request({
        url: '/api/applet/order/productionProcessSub',
        method: 'post',
        data: params
    })
}

// 生产资料全部提交完成
export const productionProgressCompleteSub = (params) => {
    return request({
        url: '/api/applet/order/productionProgressCompleteSub',
        method: 'get',
        data: params
    })
}

// 质检资料提交
export const productionQualifiedCompleteSub = (params) => {
    return request({
        url: '/api/applet/order/productionQualifiedCompleteSub',
        method: 'get',
        data: params
    })
}

// 订单完成发货
export const shipmentCompleteSub = (params) => {
    return request({
        url: '/api/applet/order/shipmentCompleteSub',
        method: 'get',
        data: params
    })
}

// 回单图片全部提交
export const shipmentReceiptSub = (params) => {
    return request({
        url: '/api/applet/order/shipmentReceiptSub',
        method: 'post',
        data: params
    })
}